const { querySql, queryOne } = require('../db/index')
function login(username, password) {
  return querySql(`select * from adminuser where username='${username}' and password='${password}'`)
}
function findUser(username) {
  return queryOne(`select username,role,avatar,sno from adminuser where username='${username}'`)
}

 function isNew(params) {
  return new Promise(async(resolve, reject) => {
    console.log("params111", params);
    const { username, sno }=params
    resolve()
  })
}

module.exports = { login, findUser, isNew }

